#include "formopen.h"
#include "ui_formopen.h"
#include <QFileDialog>

FormOpen::FormOpen(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::FormOpen)
{
    ui->setupUi(this);
    connect(ui->toolButton,SIGNAL(clicked()),SLOT(browse()));
    connect(ui->buttonBox,SIGNAL(accepted()),SLOT(accept()));
}

FormOpen::~FormOpen()
{
    delete ui;
}

QString FormOpen::getAudioSrc()
{
    return ui->lineEditAudio->text();
}

QString FormOpen::getXhtml()
{
    return ui->lineEditXhtml->text();
}

QString FormOpen::getLabel()
{
    return ui->lineEditLabel->text();
}

void FormOpen::browse()
{

    QString file = QFileDialog::getOpenFileName(this,"Audacity Tag File");
    ui->lineEditLabel->setText(file);

}

